<a
  [routerLink]="!link ? ['/home/res/' + id] : [link]"
  class="nav-link matLink clr-row clr-justify-content-between"
  routerLinkActive="active"
  [ngClass]="{ red: isEnding }"
>
  <span>
    <clr-icon
      [attr.shape]="shape"
      *ngIf="shape"
      class="resIcon"
      [ngClass]="{ 'is-error': isEnding, 'is-info': cog }"
    ></clr-icon>
    <span [class.text-danger]="cap">
      <app-formatted-quantity
        *ngIf="showQta"
        [quantity]="quantity"
        [integer]="integer"
      ></app-formatted-quantity>
    </span>
  </span>

  <span *ngIf="c" class="perSecTab clr-col clr-align-self-end">
    <span *ngIf="c && c.abs().gt(0.001)" [ngClass]="{ 'text-danger': c.lt(0) }">
      <app-formatted-quantity [quantity]="c" [integer]="integer">
      </app-formatted-quantity
      >/秒
    </span>
  </span>

  <span *ngIf="limit" class="perSecTab clr-col clr-align-self-end">
    <span>
      /
      <app-formatted-quantity [quantity]="limit" [integer]="integer">
      </app-formatted-quantity>
    </span>
  </span>
</a>
